package com.shao.demo.mybatisplusgenerator.controller;


import com.shao.demo.mybatisplusgenerator.entity.User;
import com.shao.demo.mybatisplusgenerator.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;


import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author shaozhiqi
 * @since 2021-04-24
 */
@RestController
@RequestMapping("/mybatisplusgenerator/user")
public class UserController {

    @Autowired
    private UserService userService;


    @GetMapping(value = "userList")
    public List<User> getUserList(){
        return userService.list(null);
    }
}

